package com.course.designpatterns.strategy;

/**
 * @author ：Jack Hao
 * @date ：Created in 2021/6/20 22:19
 * @description：
 */
public class DogComparator implements MyComparator<Dog>
{
    @Override
    public int compare(Dog o1, Dog o2)
    {
        if(o1.food<o2.food) return -1;
        else if(o1.food>o2.food) return 1;
        else return 0;
    }
}
